<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="bun" type="button">提交</button>
    <script type="module">
        import xxx,{a,compute} from './add.js';
        // import {b,com} from './mul.js';
        //动态导入
        let bun=document.getElementById("bun")
        bun.addEventListener("click",()=>{
        let sub= import("./mul.js")
        sub.then((module)=>{
            console.log("b的数字是"+module.b)
            console.log("com()的结果是"+module.com())
        })

        })

        // console.log(a)
        // console.log(xxx)
        // console.log("add.js的结果是"+compute())
        // console.log(b)
        // console.log("mul.js的结果是"+com())
    </script>
</body>
</html>